<template>
	<view class="container">


		<video id="videoRef" :fullplay="true" ref="videoRef"   :loop="true"  :controls="false" :enable-progress-gesture="false":show-center-play-btn="true"
			:show-play-btn="false" :show-fullscreen-btn="false"  style="width: 100%;height: 100%;" :src="src" ></video>


	</view>
</template>

<script>
	// pages/discover/choicenessCategoryList/mediaList/mediaList.js
	const app = getApp();

	export default {
		data() {
			return {
				src: '',
				showProgress: false,
				downloadTask: null,
				percentCurrent: 0, //下载进度百分比
			};
		},

		components: {},
		props: {},

		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad(options) {
			console.log(options, 'options');
			this.src = options.src
		},

		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady: function() {},

		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {
			if(this.$refs.videoRef){
				console.log("ios 要播放");
				this.$refs.videoRef.play();
			}
		},

		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide: function() {},

		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload: function() {},

		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */

		/**
		 * 页面上拉触底事件的处理函数
		 */
		onPullDownRefresh() {
		
		},

		onReachBottom: function() {

		},

		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {},
		methods: {
			videoPlay(){
				this.$refs.videoRef.play()
			},
			goback() {
				uni.navigateBack()
			},

		}
	};
</script>
<style>
	page{
		background-color: black;
	}
</style>
<style scoped>
	.close {
		width: 32rpx;
		height: 32rpx;
	}

	.downLoad {
		width: 32rpx;
		height: 32rpx;
	}

	.container {
		background-color: #333;
		height: 100vh;
		width: 100%;
		position: relative;
		color: #fff;
		font-weight: 500;
		font-size: 32rpx;
	}

	.media-box {
		height: 790rpx;
		width: 100%;
		background-color: yellow;
		position: absolute;
		transform: translateY(-50%);
		top: 50%;
	}

	.progress-box {
		position: absolute;
		bottom: 100rpx;
		left: 60rpx;
		right: 60rpx;
	}

	.nav {
		padding: 62rpx 41rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
</style>
